#include "stdio.h"

void main ()
{
	int a [10];
	int i, j, t;
	printf ("input 10 numbers:\n");
	for (i = 0; i < 10; i ++)
		scanf ("%d", &a[i]);
	printf("\n");
//	for (j = 0; j < 9; j ++)
//	for (i = 0; i < 9 - j; i ++)
//	if (a[i] > a[i + 1])
//	{
//		t = a[i];
//		a[i] = a[i + 1];
//		a[i + 1] = t;
//	}
	printf ("the sorted numbers :\n");
	for (i = 0; i < 10; i ++)
	printf("%d ", a[i]);
	printf("\n");
}
#include "stdio.h"

void main()
{
	int a [2][3] = {{1,2,3},{4,5,6}};
	int b [3][2], i, j;
	printf ("array a:\n");
	for (i = 0; i <= 1; i ++)
	{
		for (j = 0; j <= 2; j ++)
		{
			printf ("%d ", a [i][j]);
			b [j][i] = a[i][j];
		}
		printf("\n");
	}
	printf("array b:\n");
		for (i = 0; i <= 2; i ++)
		{
			for (j = 0; j <= 1; j ++)
				printf("%d ", b[i][j]);
			printf("\n");
		}
}

#include "stdio.h"

void main()
{
	int i, j, row = 0, colum = 0, max;
	int a[3][4] = {{1,2,3,4},{9,8,7,6},{-10,10,-5,2}};
	max = a[0][0];
	for (i = 0; i <= 2; i ++)
	{
		for (j = 0; j <= 3; j ++)
			if (a[i][j] > max)
			{
				max = a [i][j];
				row = i;
				colum = j;
			}
	}
	printf ("max = %d, row = %d, colum = %d\n", max , row, colum);

}